<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    安装成功
</body>
<script src="/js/socket.io.js"></script>

<script>
    let host = 'http://127.0.0.1:3000';
    let socket = io.connect(host, {
        transports: ['websocket']
    });

    socket.on('connect', () => {
        console.log('连接成功');
    })

    socket.on('msg', (msg) => {
        console.log(msg);
    })
</script>

</html>